import request from '@/router/axios'

//获取列表
export function queryInspection (params) {
    return request({
        method: 'get',
        url: '/cp/qualitytest',
        params
    })
}

//切换状态
export function changeStatus (params) {
    return request({
        method: 'get',
        url: '/cp/qualitytest/changeStatus',
        params
    })
}

//群聊列表下拉框
export function queryGroupChatList (query) {
    return request({
        url: '/cp/workroom/roomindex',
        method: 'get',
        params: query
    })
}

//全部角色查询
export function role (params) {
    return request({
        method: 'get',
        url: '/cp/role/query',
        params
    })
}

//查询所有角色用户
export function roleMember (params) {
    return request({
        method: 'get',
        url: '/cp/role/queryUserById',
        params
    })
}

//编辑列表
export function editInspection (data) {
    return request({
        method: 'put',
        url: '/cp/qualitytest',
        data
    })
}

//删除列表
export function delectInspection (params) {
    return request({
        method: 'delete',
        url: '/cp/qualitytest',
        params
    })
}

// 新建质检规则
export function addInspection (data) {
    return request({
        method: 'post',
        url: '/cp/qualitytest',
        data
    })
}

//获取角色列表
export function inspectionList (params) {
    return request({
        method: 'get',
        url: '/cp/qualitytest/getController',
        params
    })
}

//查看列表
export function checkInspection (params) {
    return request({
        url: '/cp/ruletouch/query',
        method: 'get',
        params
    })
}